class Dog {
    public String name;
    public int age;
    public String colour;

    public void bark () {
        System.out.println(name + "汪汪叫了叫");
    }
    public void wag () {
        System.out.println(name + "摇了摇尾巴");
    }
}
public class Test {
    public static int add(int a, int b){
        return a+b;
    }
    public static double add(double a, double b){
        return a+b;
    }
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        double c = 2.33;
        double d = 3.33;
        System.out.println(add(a,b));
        System.out.println(add(c,d));

        Dog dog1 = new Dog();
        dog1.name = "旺财";
        dog1.age = 1;
        dog1.colour = "黄色";
        System.out.println("我有一条" + dog1.colour + "的狗，名字叫" + dog1.name +",它已经" + dog1.age + "岁了，下面让它表演一下：");
        dog1.bark();
        dog1.wag();
    }
}
